import i18n from '@/language/index'

export const t = i18n.global.t

export default function UserModel(id, parent,menuName,path,orderNum,enableTag) {
    this.id = id;
    this.parent = parent || 0;
    this.menuName = menuName;
    this.path = path;
    this.orderNum = orderNum;
    this.enableTag = enableTag || true;

    this.rules = {
        menuName: [
            {required: true, message: t('menu.1'), trigger: 'blur'},
        ],
        path: [
            {required: true, message: t('menu.2'), trigger: 'blur'},
        ]
    }
}